DOC-6644 Semantic cache use case example#3354
Conversation
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
❌ Jit Scanner failed - Our team is investigatingJit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions. 💡 Need to bypass this check? Comment |
| renderStats(); | ||
| </script> | ||
| </body> | ||
| </html> |
There was a problem hiding this comment.
Identical HTML files duplicated across language demos
Low Severity
go/index.html and java-jedis/index.html are byte-for-byte identical 513-line files. Any fix (accessibility, styling, logic) must be replicated across every copy. The files already use runtime token substitution (__INDEX_NAME__, __KEY_PREFIX__) and a /state endpoint for per-language values, so a single shared file (symlinked or referenced from a common location) would work without code changes.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 07e86a0. Configure here.
❌ Jit Scanner failed - Our team is investigatingJit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions. 💡 Need to bypass this check? Comment |
❌ Jit Scanner failed - Our team is investigatingJit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions. 💡 Need to bypass this check? Comment |
| Locale: d.DefaultLocale, | ||
| ModelVersion: d.LLM.ModelVersion, | ||
| }) | ||
| } |
There was a problem hiding this comment.
Go Seed method lacks concurrency lock for reset
Medium Severity
The Go SemanticCacheDemo.Seed method has no synchronization, unlike the .NET port which explicitly wraps the Clear/Seed sequence in a lock (_seedLock) with the comment: "Two clients hitting /reset back-to-back would otherwise race on the drop/create/seed sequence and leave the index in an inconsistent state." Since Go's net/http handles each request in its own goroutine, concurrent POST /reset requests will race on Clear then Seed, potentially dropping the index mid-seed or double-seeding.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 0049a89. Configure here.
❌ Jit Scanner failed - Our team is investigatingJit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions. 💡 Need to bypass this check? Comment |
dwdougherty
left a comment
There was a problem hiding this comment.
Apart from one minor issue (the fact that I can't remember week over week what P95 means), LGTM.
Co-authored-by: David Dougherty <david.dougherty@redis.com>
|
@dwdougherty Thanks for the review! There probably won't be too many more use cases for a while now, but I'll remember the P95 thing going forward. |
❌ Jit Scanner failed - Our team is investigatingJit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions. 💡 Need to bypass this check? Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 3 total unresolved issues (including 2 from previous reviews).
Reviewed by Cursor Bugbot for commit 8e68f82. Configure here.
| case "--threshold": | ||
| a.Threshold = double.Parse(RequireValue(argv, ++i, flag), | ||
| System.Globalization.NumberStyles.Float, | ||
| System.Globalization.CultureInfo.InvariantCulture); |
There was a problem hiding this comment.
CLI --threshold accepts NaN/Infinity, breaking /state endpoint
Low Severity
The --threshold and --llm-latency-ms CLI flags use double.Parse which happily accepts "NaN" and "Infinity". If NaN reaches cache.DistanceThreshold, the /state endpoint assigns it into a JsonObject (["default_threshold"] = cache.DistanceThreshold), and System.Text.Json throws JsonException when serializing NaN (which isn't valid JSON). This makes /state return 500 on every call, breaking the demo UI on page load. The same commit's audit-checklist row 32 explicitly identifies this class of bug and prescribes textual rejection before parsing — but the CLI boundary doesn't follow its own guidance.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 8e68f82. Configure here.
DOC-6644 Semantic cache use case example


Not finished yet - this is just for some early Bugbot reports at this stage.
Note
Medium Risk
Large new example surface (vector search, embeddings, multi-client parity) where subtle bugs in TAG escaping, thresholds, or concurrency could mislead readers; changes are docs/demos only, not production services.
Overview
Adds a new semantic cache use case under
content/develop/use-cases/semantic-cache/: a landing page that explains thresholded KNN over cached LLM responses (with tenant/locale/model metadata inFT.SEARCH), links it from the use-cases index, and ships runnable multi-language examples—this diff includes full Go (go-redis+ Hugot) and .NET (NRedisStack + ONNX Runtime) stacks with shared interactiveindex.html, mock LLM, seed data, and per-language guides.The redis-use-case-ports skill and
audit-checklist.mdgain six new rows (29–34) and a Phase 4b note to verify independent-review findings before fixing, capturing bug classes found while building this use case (embedder thread-safety, fake config knobs, lockfile vs manifest PHP version, NaN parsing quirks,/state-driven UI strings, escaped TAG values in docs).Reviewed by Cursor Bugbot for commit 8e68f82. Bugbot is set up for automated code reviews on this repo. Configure here.